abstract class shape{
    public abstract void draw();
}

class rect extends shape{
    @Override
    public void draw(){
        System.out.println("画矩形！！！");
    }
}

class cycle extends shape{
    @Override
    public void draw(){
        System.out.println("画圆型！！！");
    }
}

class flower extends shape{
    @Override
    public void draw(){
        System.out.println("画花！！！");
    }
}

public class test_11_15 {
    public static void drawmap(shape s){
        s.draw();
    }

    public static void main(String[] args) {
        rect r=new rect();
        cycle c=new cycle();
        flower f=new flower();
        drawmap(r);
        drawmap(c);
        drawmap(f);
        System.out.println("-------------------");
        shape[] shapes={r,c,f};
        for (shape s:shapes){
            s.draw();
        }

    }

}





